home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / versa11.arc / VERSA-C.CMD < prev    next >
OS/2 REXX Batch file  |  1987-05-23  |  43KB  |  1,041 lines

  1. ;PC Pursuit: VERSAdial, Version 1.1, by Allen Brunson, David Rhoten, and Gizmo
  2. ;(C) 1987, Allen Brunson
  3.  
  4. ;========== VARIABLE TABLE ==========
  5. ;VERSA is consistent about its use of variables.  Here is a table that briefly
  6. ;describes the use of each.  Note that, from VERSA's point of view, the
  7. ;macros stored in VERSA.KEY are also variables, so they are included here as
  8. ;well.
  9.  
  10. ;NORMAL VARIABLES:
  11. ;S0  Stores the user's current level (1 = offline, 2 = local, 3 = remote)
  12. ;S1  Area code to be dialed
  13. ;S2  BBS phone number to be dialed
  14. ;S3  Cleared for future use
  15. ;S4  Cleared for future use
  16. ;S5  Cleared for future use
  17. ;S6 *Extended Menus ("ON" or "OFF")
  18. ;S7  Command file to execute upon connect
  19. ;S8  RGETs
  20. ;S9  Secondary RGETs, user input, parameter passing from menus
  21.  
  22. ;MACROS IN VERSA.KEY:
  23. ;A7 *Local Telenet number <CR>
  24. ;A8 *PC-P baud rate
  25. ;A9 *Your user ID <CR>
  26. ;A0 *Your password <CR>
  27.  
  28. ;NOTE: Variables with an asterisk are set once at the beginning of execution
  29. ;and should NOT be changed at any time.  Alt-1 through Alt-6 in VERSA.KEY
  30. ;can be set to whatever you wish.
  31.  
  32.  
  33.  
  34. ;========== RE_ENTRY ==========
  35. ;This first section of the command file handles re-entry from one of the
  36. ;menus, if this has occurred.  S9 is used as the parameter variable.  If one
  37. ;of the menus has set S9 to "ACTIVE", then a number has been properly
  38. ;assigned to S2, and dialing can proceed.  If the user entered "D", "E", or
  39. ;"G" in the menu, those values are left alone and passed directly to here.
  40. ;If VERSA is starting fresh, then S9 will be null, and execution will begin
  41. ;as usual.  If S9 is set to anything else, VERSA will terminate with an
  42. ;error.
  43.  
  44. RE_ENTRY:
  45. SWITCH S9              ;Decision based on S9
  46.    CASE "_NULL"        ;If S9 has no value . . .
  47.       GOTO BEGIN       ;Begin execution normally
  48.    ENDCASE
  49.    CASE "D"            ;If S9 = "D" (Disconnect) . . .
  50.       GOTO PCPOFF      ;PCPOFF will take care of disconnection
  51.    ENDCASE
  52.    CASE "E"            ;If S9 = "E" (Exit) . . .
  53.       CLEAR            ;Clear the screen . . .
  54.       GOTO VERSAOFF    ;And exit
  55.    ENDCASE
  56.    CASE "G"            ;If S9 = "G" (Go back to city menu) . . .
  57.       FIND S0 "3"      ;Look for "3" in S0
  58.       IF FOUND         ;If found, level = 3 . . .
  59.          GOSUB DISC3   ;So disconnect from remote city
  60.       ENDIF
  61.       GOTO CITYCHOICE  ;Then, select a new city
  62.    ENDCASE
  63.    CASE "ACTIVE"       ;If S9 equals "ACTIVE" . . .
  64.       GOTO GOLEVEL     ;Then begin dialing
  65.    ENDCASE
  66.    DEFAULT             ;If S9 equals anything else . . .
  67.       CLEAR            ;Clear the screen
  68.       LOCATE 11,20     ;Locate cursor for message . . .
  69.       MESSAGE "Parameter error from menu command file."
  70.       LOCATE 14,0      ;Locate cursor for VERSAOFF message
  71.       GOTO VERSAOFF    ;And terminate
  72.    ENDCASE
  73. ENDSWITCH              ;All possibilities covered
  74.  
  75.  
  76.  
  77. ;========== BEGIN ==========
  78. ;This section of the command file sets up some defaults.  If you want
  79. ;to turn the extended menus off, this is the section to change.  After
  80. ;the defaults are set, this section jumps past the subroutines and
  81. ;dialing routines to the real beginning of the code, TITLE.
  82.  
  83. BEGIN:
  84. SET CR_IN CR       ;Make sure LFs aren't added to incoming <CR>s
  85. SET CR_OUT CR      ;Ditto for outgoing <CR>s
  86. SET PARITY EVEN    ;Parity and databits must be set to . . .
  87. SET DATABITS 7     ;even and 7 for communicating with Telenet
  88. SET DUPLEX FULL    ;Just in case you were at HALF
  89. SET BAUDRATE 1200  ;Baud rate of YOUR modem
  90. ASSIGN S6 "ON"     ;Extended menus (ON or OFF)
  91. MLOAD "VERSA.KEY"  ;Load in user information
  92. GOTO TITLE         ;Go to beginning of code
  93.  
  94.  
  95.  
  96. ;========== SUBROUTINES ==========
  97. ;We call these "subroutines," but most of them are not, in the truest sense
  98. ;of the word, because they do not all end in a RETURN.  They are placed here
  99. ;near the top of the command file so that they will be found quickly as
  100. ;ProComm searches for their labels.
  101.  
  102.  
  103. ;CITYREDIAL is done repeatedly if the first attempt to connect to a remote
  104. ;city fails and the user opts to redial.  This subroutine will repeat until
  105. ;a connection with the remote city is made; control will then pass to
  106. ;PORTSET, which will configure the remote modem.
  107.  
  108. CITYREDIAL:
  109. CLEAR                ;Clear screen
  110. TRANSMIT "C DIAL"    ;Beginning of city dial command
  111. TRANSMIT S1          ;Area code
  112. MACRO 8              ;PCP baud rate
  113. MACRO 9              ;User ID
  114. WAITFOR "="          ;Wait for "PASSWORD ="
  115. MACRO 0              ;User password
  116. RGET S8              ;Get first <CR>
  117. RGET S8              ;Get second <CR>
  118. RGET S8              ;Get message from Telenet
  119. FIND S8 "CONNECTED"  ;Look for "CONNECTED" in S8
  120. IF FOUND             ;If "CONNECTED" is in S8,
  121.    MESSAGE "^G"      ;Sound the bell, because . . .
  122.    GOTO PORTSET      ;City is connected; Go to PORTSET
  123. ENDIF
  124. GOTO CITYREDIAL      ;If not found, loop back to CITYREDIAL
  125.  
  126.  
  127. ;BBSREDIAL is done repeatedly if the first attempt to connect to a BBS
  128. ;fails and the user elects to redial.  Once a connection is made, control
  129. ;passes to BBSCONNECT.  Note LABEL1 -- it is the beginning of the loop,
  130. ;so that the CLEAR above it will be executed only once.
  131.  
  132. BBSREDIAL:
  133. CLEAR               ;Clear the screen -- only done once
  134. LABEL1:             ;Beginning of redial loop
  135. TRANSMIT "A/!"      ;Hayes command for "repeat last command"
  136. RGET S8 80 40       ;Wait a maximum of 40 seconds to get first <CR> back
  137. RGET S8             ;Get string from modem
  138. FIND S8 "CONNECT"   ;Look for "CONNECT" in modem string
  139. IF FOUND            ;If "CONNECT" is found in S8 . . .
  140.    GOTO BBSCONNECT  ;BBS has been connected -- go to BBSCONNECT
  141. ENDIF
  142. GOTO LABEL1         ;Otherwise, loop to LABEL1
  143.  
  144.  
  145. ;BBSCONNECT is performed once the BBS has been connected with.  The main
  146. ;purpose here is to reset the parity and databits, since they were set to
  147. ;even and 7 for communication with Telenet.  Also, if a dialing directory
  148. ;entry was used that has a linked command file, BBSCONNECT will execute it.
  149. ;If you are going to communicate with a BBS or other computer that works
  150. ;at anything other than 8,N,1, then you should either customize this
  151. ;subroutine or write a linked command file that changes the parameters.
  152.  
  153. BBSCONNECT:
  154. SET PARITY NONE            ;Reset parameters . . .
  155. SET DATABITS 8             ;For use with BBSs
  156. ALARM 2                    ;Inform user of connection
  157. SWITCH S7                  ;Decision based on S7 (BBS command file)
  158.    CASE "_NULL"            ;If S7 is empty (no linked command file) . . .
  159.       MLOAD "PROCOMM.KEY"  ;Reload PROCOMM.KEY
  160.       EXIT                 ;Then exit
  161.    ENDCASE
  162.    DEFAULT                 ;Otherwise . . .
  163.       EXECUTE S7           ;Perform the linked command file
  164.    ENDCASE
  165. ENDSWITCH                  ;All possibilities covered
  166.  
  167.  
  168. ;PCPOFF is used to disconnect from PCP entirely.  It must first determine
  169. ;the current PCP level, i. e., connected to a remote city, connected to
  170. ;local Telenet only, etc.  This will be the value of S0.  Then, the
  171. ;appropriate subroutines are performed.  Finally, VERSA itself will
  172. ;terminate.
  173.  
  174. PCPOFF:
  175. CLEAR                ;Clear the screen
  176. IF NOT CONNECTED     ;If PCP has disconnected . . .
  177.    GOTO VERSAOFF     ;Go directly to VERSAOFF
  178. ENDIF
  179. SWITCH S0            ;Decision based on S0 (level information)
  180.    CASE "1"          ;If S0 = "1" (offline), no disconnection needed . . .
  181.       GOTO VERSAOFF  ;Just go to VERSAOFF (terminate VERSA)
  182.    ENDCASE
  183.    CASE "2"          ;If S0 = "2" (Local Telenet level) . . .
  184.       GOTO DISC2     ;Disconnect from level 2; VERSAOFF will follow
  185.    ENDCASE
  186.    CASE "3"          ;If S0 = "3" (Remote city level) . . .
  187.       GOSUB DISC3    ;Disconnect from level 3 . . .
  188.       GOTO DISC2     ;Disconnect from level 2; VERSAOFF will follow
  189.    ENDCASE
  190. ENDSWITCH            ;All possibilities covered
  191.  
  192.  
  193. ;DISC3 (disconnect from level 3) is a true subroutine.  It is performed to
  194. ;disconnect from a remote city, sending the user back to the local Telenet
  195. ;level, whenever this is required.  DISC3 assumes that Telenet has been set
  196. ;to look for a BREAK as the command to return to the Telenet prompt, but
  197. ;will try <CR>@<CR> if that doesn't work.
  198.  
  199. DISC3:
  200. CLEAR               ;Clear the screen
  201. MESSAGE "Disconnecting from remote city . . ."
  202. BREAK 10            ;Send a BREAK, 10 ms, to return to Telenet prompt
  203. WAITFOR "@" 5       ;Wait for Telenet prompt
  204. TRANSMIT "!"        ;Get fresh prompt, in case of garbage characters
  205. IF NOT WAITFOR      ;If that didn't work . . .
  206.    TRANSMIT "!@!"   ;Transmit <CR>@<CR> to return to Telenet prompt
  207. ENDIF
  208. WAITFOR "@" 5       ;Wait for appearance of Telenet prompt
  209. TRANSMIT "D!"       ;Transmit D<CR>; disconnect command
  210. WAITFOR "@" 5       ;Wait for next Telenet prompt
  211. MESSAGE "^M^J^M^J"  ;Send CR/LFs, in case of DISC2 messages following
  212. PAUSE 1             ;Allow user to see results
  213. ASSIGN S0 "2"       ;Level is now 2 (local Telenet level)
  214. RETURN              ;RETURN to caller
  215.  
  216.  
  217. ;DISC2 (disconnect from level 2) is used to disconnect from the local
  218. ;Telenet level, thereby putting the user's modem offline.  It is assumed
  219. ;that the user must also be finished with VERSA, so DISC2 always "falls
  220. ;through" to VERSAOFF.
  221.  
  222. DISC2:
  223. MESSAGE "Disconnecting from local Telenet . . .^M^J"
  224. TRANSMIT "HANGUP!"  ;Disconnect from Telenet command
  225. PAUSE 1             ;Causes "garbage" character to go behind HANGUP
  226. MESSAGE "^M^J"      ;CR/LF sent to make next message further down
  227.  
  228.  
  229. ;VERSAOFF is very simple.  Whenever VERSA terminates itself, this is the
  230. ;last subroutine executed (except when a BBS has been connected).  So, if
  231. ;there is something that you would like to have done every time VERSA ends
  232. ;normally, place the commands here.  VERSAOFF reloads PROCOMM.KEY, since
  233. ;VERSA.KEY was loaded for use while VERSA was executing.
  234.  
  235. VERSAOFF:
  236. MLOAD "PROCOMM.KEY"        ;Reload PROCOMM.KEY
  237. MESSAGE "VERSA finished."  ;Inform the user
  238. EXIT                       ;End the command file
  239.  
  240.  
  241. ;NETREDIAL is used to redial the Net Exchange, if the user selected it from
  242. ;The City Menu and it was busy.  Once NETREDIAL connects with the Net
  243. ;Exchange, control is passed to BBSCONNECT.
  244.  
  245. NETREDIAL:
  246. CLEAR                  ;Clear the screen
  247. TRANSMIT "C PURSUIT,"  ;Beginning of Net Exchange dial command
  248. MACRO 9                ;Transmit user ID
  249. WAITFOR "="            ;Wait for "PASSWORD ="
  250. MACRO 0                ;Transmit password
  251. RGET S8                ;Get first <CR>
  252. RGET S8                ;Get second <CR>
  253. RGET S8                ;Get message
  254. FIND S8 "CONNECTED"    ;Look for "CONNECTED" in S8
  255. IF FOUND               ;If it is found . . .
  256.    GOTO BBSCONNECT     ;Go to BBSCONNECT
  257. ENDIF
  258. GOTO NETREDIAL         ;Otherwise, loop for another redial
  259.  
  260.  
  261. ;NETDIAL is used to dial the Net Exchange, with the C PURSUIT command.  If
  262. ;a redial is requested, NETDIAL will branch to NETREDIAL.  If the Net
  263. ;Exchange is connected with, NETDIAL will branch to BBSCONNECT.
  264.  
  265. NETDIAL:
  266. TRANSMIT "C PURSUIT,"  ;Beginning of PURSUIT command
  267. MACRO 9                ;Transmit user ID
  268. WAITFOR "="            ;Wait for "PASSWORD ="
  269. MACRO 0                ;Transmit password
  270. RGET S8                ;Get first <CR>
  271. RGET S8                ;Get second <CR>
  272. RGET S8                ;Get message
  273. FIND S8 "CONNECTED"    ;Look for "CONNECTED" in S8
  274. IF FOUND               ;If it's there,
  275.    GOTO BBSCONNECT     ;Go to BBSCONNECT
  276. ENDIF
  277. CLEAR                  ;Otherwise, clear the screen
  278. LOCATE 11,16           ;Locate cursor for message
  279. MESSAGE "The Net Exchange is busy.  Begin redial <Y/N>?"
  280. LABEL2:                ;Loop to here in case of erroneous input
  281. LOCATE 11,63           ;Locate cursor for user input
  282. GET S9 1               ;Get user input (1 character)
  283. SWITCH S9              ;Decision based on user input
  284.    CASE "Y"            ;If the user entered "Y" . . .
  285.       GOTO NETREDIAL   ;Begin redialing
  286.    ENDCASE
  287.    CASE "N"            ;If the user entered "N" . . .
  288.       GOTO CITYCHOICE  ;Another city must be selected
  289.    ENDCASE
  290.    CASE "D"            ;If the user entered "D" . . .
  291.      GOTO PCPOFF       ;PCPOFF will take care of the disconnection
  292.    ENDCASE
  293.    CASE "E"            ;If the user entered "E" . . .
  294.       CLEAR            ;Clear the screen
  295.       GOTO VERSAOFF    ;Exit VERSA
  296.    ENDCASE
  297.    DEFAULT             ;Anything else is erroneous input
  298.       MESSAGE "^G"     ;Beep at the user
  299.       LOCATE 11,63     ;Locate cursor
  300.       MESSAGE " "      ;Erase erroneous input
  301.       GOTO LABEL2      ;Redo the GET
  302.    ENDCASE
  303. ENDSWITCH              ;All possibilities covered
  304.  
  305.  
  306.  
  307. ;========== TITLE ==========
  308. ;This is the real beginning of the command file.  This is the first thing
  309. ;done after the defaults are set in BEGIN.  TITLE displays the "credits"
  310. ;and then determines the current PCP level (modem offline, local Telenet
  311. ;level, or remote city level.)  Once the level has been determined, it is
  312. ;stored in S0 as a 1, 2, or 3, respectively.
  313.  
  314. TITLE:
  315. CLEAR                    ;Clear the screen
  316. LOCATE 2,0               ;Locate the cursor for credit drawing
  317. MESSAGE "                       ╔═══════════════════════════════╗"
  318. MESSAGE "                       ║                               ║"
  319. MESSAGE "                       ║     PC Pursuit: VERSAdial     ║"
  320. MESSAGE "                       ║   Written by Allen Brunson,   ║"
  321. MESSAGE "                       ║    David Rhoten, and Gizmo    ║"
  322. MESSAGE "                       ║                               ║"
  323. MESSAGE "                       ║       `"D`" - Disconnect        ║"
  324. MESSAGE "                       ║       `"E`" - Exit VERSA        ║"
  325. MESSAGE "                       ║                               ║"
  326. MESSAGE "                       ╚═══════════════════════════════╝"
  327. LOCATE 14,0              ;Locate the cursor for next message
  328. MESSAGE "Determining PC Pursuit level . . .^M^J"
  329. IF NOT CONNECTED         ;If local modem is offline . . .
  330.    MESSAGE "Modem is currently offline."
  331.    ASSIGN S0 "1"         ;Then the level is 1
  332.    PAUSE 1               ;Allow user to see message
  333.    GOTO CITYCHOICE       ;Go to city selection
  334. ENDIF
  335. TRANSMIT "ATZ!"          ;Test for a remote modem
  336. RGET S8 80 3             ;Get first <CR>
  337. RGET S8 80 3             ;This is where "?" will come back, if local Telenet
  338. RGET S9 80 3             ;This is where "OK" will come back, if remote city
  339. FIND S8 "?"              ;Look for "?" in S8
  340. IF FOUND                 ;If "?" is found in S8, at local Telenet . . .
  341.    MESSAGE "^M^JLocal Telenet level determined."
  342.    ASSIGN S0 "2"         ;Therefore, the level is 2
  343.    PAUSE 1               ;Allow user to see message
  344.    GOTO CITYCHOICE       ;Go to city selection
  345. ENDIF
  346. FIND S9 "OK"             ;Look for "OK" in S9
  347. IF FOUND                 ;If "OK" is found in S9, must be remote level . . .
  348.    MESSAGE "^M^JRemote city level determined."
  349.    ASSIGN S0 "3"         ;Therefore, the level is 3
  350.    PAUSE 1               ;Allow user to see message
  351.    GOTO MENUCHECK        ;User must select a BBS to dial
  352. ENDIF
  353. FIND S9 "MANUAL ANSWER"  ;Look for R/V mode response
  354. IF FOUND                 ;If modem is in R/V mode,
  355.    TRANSMIT "!"          ;Transmit a <CR>
  356.    PAUSE 1               ;Wait
  357.    TRANSMIT "!"          ;Transmit another <CR>
  358.    WAITFOR "*" 10        ;Wait for R/V prompt
  359.    TRANSMIT "I!"         ;Return to Hayes mode
  360.    WAITFOR "IDLE"        ;Wait for confirmation
  361.    TRANSMIT "ATZ!"       ;Reset in Hayes mode
  362.    WAITFOR "OK"          ;Wait for "OK"
  363.    MESSAGE "^M^JRemote city level determined."
  364.    ASSIGN S0 "3"         ;Level is now 3
  365.    PAUSE 1               ;Allow user to see message
  366.    GOTO MENUCHECK        ;User must select a BBS to dial
  367. ENDIF                    ;If none of that worked . . .
  368. MESSAGE "^M^JUnable to determine level.^M^J"
  369. GOTO VERSAOFF            ;Something is fishy, VERSA will not proceed
  370.  
  371.  
  372.  
  373. ;========== CITYCHOICE ==========
  374. ;This routine is used to get the area code that the user wishes to call.
  375. ;(Or, to allow the user to directly dial the Net Exchange.)  If necessary,
  376. ;this routine will call CITYMENU to print a menu of selections.  (The
  377. ;decision to draw the menu or not is based on the value of S6, and whether
  378. ;or not the user requests it by entering "M".)  When CITYCHOICE is
  379. ;finished, it will "fall through" to MENUCHECK.
  380.  
  381. CITYCHOICE:
  382. FIND S6 "OFF"                  ;Look for "OFF" in S6 (menu choice)
  383. IF NOT FOUND                   ;If menus are set "ON",
  384.    GOTO CITYMENU               ;Draw CITYMENU
  385. ENDIF
  386. CLEAR                          ;Otherwise, clear the screen
  387. LOCATE 10,26                   ;Locate cursor for first message
  388. MESSAGE "Enter desired area code:"
  389. LOCATE 12,29                   ;Locate cursor for second message
  390. MESSAGE "Options: 1-26, M"
  391. LOCATE 10,51                   ;Locate cursor for user input
  392. GET S9 3                       ;Get user input (3 characters)
  393. LABEL3:                        ;If called, CITYMENU returns to here
  394. SWITCH S9                      ;Decision based on user input
  395.    CASE "1"
  396.       ASSIGN S1 "404"          ;Cases 1 through 26 are more or less
  397.    ENDCASE                     ;the same (except 6).  Each assigns
  398.    CASE "2"                    ;an area code to S1, depending on which
  399.       ASSIGN S1 "617"          ;number the user entered.  Number 6 is
  400.    ENDCASE                     ;different, because it uses the direct
  401.    CASE "3"                    ;C PURSUIT command.
  402.       ASSIGN S1 "216"
  403.    ENDCASE
  404.    CASE "4"
  405.       ASSIGN S1 "313"
  406.    ENDCASE
  407.    CASE "5"
  408.       ASSIGN S1 "305"
  409.    ENDCASE
  410.    CASE "6"                    ;If user selects the Net Exchange . . .
  411.       ASSIGN S1 "NET"          ;Assign "NET" to S1
  412.      ;ASSIGN S7 "COMMAND.VER"  ;Command file to execute upon connect
  413.       GOTO GOLEVEL             ;Begin dialing at GOLEVEL
  414.    ENDCASE
  415.    CASE "7"
  416.       ASSIGN S1 "201"
  417.    ENDCASE
  418.    CASE "8"
  419.       ASSIGN S1 "212"
  420.    ENDCASE
  421.    CASE "9"
  422.       ASSIGN S1 "215"
  423.    ENDCASE
  424.    CASE "10"
  425.       ASSIGN S1 "919"
  426.    ENDCASE
  427.    CASE "11"
  428.       ASSIGN S1 "813"
  429.    ENDCASE
  430.    CASE "12"
  431.       ASSIGN S1 "202"
  432.    ENDCASE
  433.    CASE "13"
  434.       ASSIGN S1 "312"
  435.    ENDCASE
  436.    CASE "14"
  437.       ASSIGN S1 "214"
  438.    ENDCASE
  439.    CASE "15"
  440.       ASSIGN S1 "713"
  441.    ENDCASE
  442.    CASE "16"
  443.       ASSIGN S1 "414"
  444.    ENDCASE
  445.    CASE "17"
  446.       ASSIGN S1 "612"
  447.    ENDCASE
  448.    CASE "18"
  449.       ASSIGN S1 "303"
  450.    ENDCASE
  451.    CASE "19"
  452.       ASSIGN S1 "602"
  453.    ENDCASE
  454.    CASE "20"
  455.       ASSIGN S1 "801"
  456.    ENDCASE
  457.    CASE "21"
  458.       ASSIGN S1 "818"
  459.    ENDCASE
  460.    CASE "22"
  461.       ASSIGN S1 "213"
  462.    ENDCASE
  463.    CASE "23"
  464.       ASSIGN S1 "503"
  465.    ENDCASE
  466.    CASE "24"
  467.       ASSIGN S1 "415"
  468.    ENDCASE
  469.    CASE "25"
  470.       ASSIGN S1 "408"
  471.    ENDCASE
  472.    CASE "26"
  473.       ASSIGN S1 "206"
  474.    ENDCASE
  475.    CASE "D"                    ;If the user enters "D" . . .
  476.       GOTO PCPOFF              ;Then PCPOFF will take care of disconnection
  477.    ENDCASE
  478.    CASE "E"                    ;If user enters "E" . . .
  479.       CLEAR                    ;Clear the screen . . .
  480.       GOTO VERSAOFF            ;And exit
  481.    ENDCASE
  482.    CASE "M"                    ;If user enters "M" . . .
  483.       GOTO CITYMENU            ;Draw CITYMENU (which will return to LABEL3)
  484.    ENDCASE
  485.    DEFAULT                     ;Any other input should be an area code . . .
  486.       ASSIGN S1 S9             ;So assign it to S1
  487.    ENDCASE
  488. ENDSWITCH                      ;All possibilities covered
  489.  
  490.  
  491.  
  492. ;========== MENUCHECK ==========
  493. ;This code segment decides whether the VERSA?.MNU files should be called,
  494. ;or if the built-in 20 number dialer should be used instead.  The
  495. ;decision is based on the value the user entered for S6 in the BEGIN code
  496. ;segment.  If the area code variable is null, which happens on remote city
  497. ;level starts, then MENUCHECK gives the user the opportunity to enter the
  498. ;area code, and then be able to use the VERSA?.MNU files.  (This of course
  499. ;only happens if the user has the extended menus set ON.)  If the current
  500. ;area code is unknown to VERSA, MENUCHECK will "fall through" to BBSMENU.
  501.  
  502. MENUCHECK:
  503. FIND S6 "OFF"               ;Look for "OFF" in S6
  504. IF FOUND                    ;If found (menus set off),
  505.    GOTO BBSCHOICE           ;Go to BBSCHOICE
  506. ENDIF                       ;Otherwise . . .
  507. SWITCH S1                   ;Decision based on selected area code
  508.    CASE "404"
  509.       EXECUTE "VERSA1.MNU"  ;Cases 1 through 25 are more or less the
  510.    ENDCASE                  ;same.  Each executes the correct MENU file
  511.    CASE "617"               ;that that city's menu can be found in.
  512.       EXECUTE "VERSA1.MNU"
  513.    ENDCASE
  514.    CASE "216"
  515.       EXECUTE "VERSA1.MNU"
  516.    ENDCASE
  517.    CASE "313"
  518.       EXECUTE "VERSA1.MNU"
  519.    ENDCASE
  520.    CASE "305"
  521.       EXECUTE "VERSA1.MNU"
  522.    ENDCASE
  523.    CASE "201"
  524.       EXECUTE "VERSA1.MNU"
  525.    ENDCASE
  526.    CASE "212"
  527.       EXECUTE "VERSA2.MNU"
  528.    ENDCASE
  529.    CASE "215"
  530.       EXECUTE "VERSA2.MNU"
  531.    ENDCASE
  532.    CASE "919"
  533.       EXECUTE "VERSA2.MNU"
  534.    ENDCASE
  535.    CASE "813"
  536.       EXECUTE "VERSA2.MNU"
  537.    ENDCASE
  538.    CASE "202"
  539.       EXECUTE "VERSA2.MNU"
  540.    ENDCASE
  541.    CASE "312"
  542.       EXECUTE "VERSA2.MNU"
  543.    ENDCASE
  544.    CASE "214"
  545.       EXECUTE "VERSA3.MNU"
  546.    ENDCASE
  547.    CASE "713"
  548.       EXECUTE "VERSA3.MNU"
  549.    ENDCASE
  550.    CASE "414"
  551.       EXECUTE "VERSA3.MNU"
  552.    ENDCASE
  553.    CASE "612"
  554.       EXECUTE "VERSA3.MNU"
  555.    ENDCASE
  556.    CASE "303"
  557.       EXECUTE "VERSA3.MNU"
  558.    ENDCASE
  559.    CASE "602"
  560.       EXECUTE "VERSA3.MNU"
  561.    ENDCASE
  562.    CASE "801"
  563.       EXECUTE "VERSA4.MNU"
  564.    ENDCASE
  565.    CASE "818"
  566.       EXECUTE "VERSA4.MNU"
  567.    ENDCASE
  568.    CASE "213"
  569.       EXECUTE "VERSA4.MNU"
  570.    ENDCASE
  571.    CASE "503"
  572.       EXECUTE "VERSA4.MNU"
  573.    ENDCASE
  574.    CASE "415"
  575.       EXECUTE "VERSA4.MNU"
  576.    ENDCASE
  577.    CASE "408"
  578.       EXECUTE "VERSA4.MNU"
  579.    ENDCASE
  580.    CASE "206"
  581.       EXECUTE "VERSA4.MNU"
  582.    ENDCASE
  583.    CASE "_NULL"             ;If area code variable is null . . .
  584.       CLEAR                 ;Clear the screen
  585.       LOCATE 11,18          ;Locate cursor for message
  586.       MESSAGE "Enter area code, or <Return> if unknown:"
  587.       LOCATE 11,59          ;Locate cursor for user input
  588.       GET S9 3              ;Get user input (3 characters)
  589.       SWITCH S9             ;Decision based on user input
  590.          CASE "_NULL"       ;If user entered nothing . . .
  591.             GOTO BBSMENU    ;Use built-in BBS menu
  592.          ENDCASE
  593.          CASE "D"           ;If user entered "D" . . .
  594.             GOTO PCPOFF     ;Then PCPOFF will take care of disconnection
  595.          ENDCASE
  596.          CASE "E"           ;If user entered "E" . . .
  597.             CLEAR           ;Clear the screen
  598.             GOTO VERSAOFF   ;Exit VERSA
  599.          ENDCASE
  600.          DEFAULT            ;Otherwise (user entered area code),
  601.             ASSIGN S1 S9    ;Put the area code in S1
  602.             GOTO MENUCHECK  ;Re-execute this code segment
  603.          ENDCASE
  604.       ENDSWITCH             ;All possible inputs covered
  605.    ENDCASE
  606. ENDSWITCH                   ;All possibilities covered
  607.  
  608.  
  609.  
  610. ;========== BBSCHOICE ==========
  611. ;After the user has entered an area code, BBSCHOICE prompts the user for a
  612. ;number to dial (if the extended menus are not used).  Also, if a command
  613. ;file is used with a dialing entry, it is assigned to S7.  An additional
  614. ;choice is also offered: "G", or Go back to city selection.  As always, "D"
  615. ;and "E" are valid selections.  Once BBSCHOICE is finished, it usually
  616. ;"falls through" to GOLEVEL, depending on user input.
  617.  
  618. BBSCHOICE:
  619. FIND S6 "OFF"                  ;Look for "OFF" in S6 (menu selection)
  620. IF NOT FOUND                   ;If not found (menus set on),
  621.    GOTO BBSMENU                ;draw BBSMENU (this is needed in case that
  622. ENDIF                          ;MENUCHECK "fell through" to here)
  623. CLEAR                          ;Otherwise, clear the screen
  624. LOCATE 10,23                   ;Locate the cursor for first message
  625. MESSAGE "Enter phone number of BBS:"
  626. LOCATE 12,26                   ;Locate the cursor for second message
  627. MESSAGE "Options: 1-20, G, M"
  628. LOCATE 10,50                   ;Locate the cursor for user input
  629. GET S9 7                       ;Get user input (7 characters)
  630. LABEL4:                        ;If BBSMENU is called, it will return to here
  631. SWITCH S9                      ;Decision based on user input
  632.    CASE "1"
  633.       ASSIGN S2 "4330062"      ;Cases 1-20 are all identical.  Each
  634.      ;ASSIGN S7 "COMMAND.VER"  ;assigns the number of a BBS to S2, and
  635.    ENDCASE                     ;assigns a command file to S7 to be
  636.    CASE "2"                    ;executed once that BBS connects.  The
  637.       ASSIGN S2 "2373750"      ;command file is optional, and may be
  638.      ;ASSIGN S7 "COMMAND.VER"  ;omitted entirely.
  639.    ENDCASE
  640.    CASE "3"
  641.       ASSIGN S2 "9942944"
  642.      ;ASSIGN S7 "COMMAND.VER"
  643.    ENDCASE
  644.    CASE "4"
  645.       ASSIGN S2 "3496576"
  646.      ;ASSIGN S7 "COMMAND.VER"
  647.    ENDCASE
  648.    CASE "5"
  649.       ASSIGN S2 "9645160"
  650.      ;ASSIGN S7 "COMMAND.VER"
  651.    ENDCASE
  652.    CASE "6"
  653.       ASSIGN S2 "7814723"
  654.      ;ASSIGN S7 "COMMAND.VER"
  655.    ENDCASE
  656.    CASE "7"
  657.       ASSIGN S2 "17184571752"
  658.      ;ASSIGN S7 "COMMAND.VER"
  659.    ENDCASE
  660.    CASE "8"
  661.       ASSIGN S2 "5243984"
  662.      ;ASSIGN S7 "COMMAND.VER"
  663.    ENDCASE
  664.    CASE "9"
  665.       ASSIGN S2 "8482106"
  666.      ;ASSIGN S7 "COMMAND.VER"
  667.    ENDCASE
  668.    CASE "10"
  669.       ASSIGN S2 "4311194"
  670.      ;ASSIGN S7 "COMMAND.VER"
  671.    ENDCASE
  672.    CASE "11"
  673.       ASSIGN S2 "6893561"
  674.      ;ASSIGN S7 "COMMAND.VER"
  675.    ENDCASE
  676.    CASE "12"
  677.       ASSIGN S2 "6960360"
  678.      ;ASSIGN S7 "COMMAND.VER"
  679.    ENDCASE
  680.    CASE "13"
  681.       ASSIGN S2 "3813320"
  682.      ;ASSIGN S7 "COMMAND.VER"
  683.    ENDCASE
  684.    CASE "14"
  685.       ASSIGN S2 "5767285"
  686.      ;ASSIGN S7 "COMMAND.VER"
  687.    ENDCASE
  688.    CASE "15"
  689.       ASSIGN S2 "9363058"
  690.      ;ASSIGN S7 "COMMAND.VER"
  691.    ENDCASE
  692.    CASE "16"
  693.       ASSIGN S2 "8824227"
  694.      ;ASSIGN S7 "COMMAND.VER"
  695.    ENDCASE
  696.    CASE "17"
  697.       ASSIGN S2 "7295377"
  698.      ;ASSIGN S7 "COMMAND.VER"
  699.    ENDCASE
  700.    CASE "18"
  701.       ASSIGN S2 "XXXXXXX"
  702.      ;ASSIGN S7 "COMMAND.VER"
  703.    ENDCASE
  704.    CASE "19"
  705.       ASSIGN S2 "XXXXXXX"
  706.      ;ASSIGN S7 "COMMAND.VER"
  707.    ENDCASE
  708.    CASE "20"
  709.       ASSIGN S2 "XXXXXXX"
  710.      ;ASSIGN S7 "COMMAND.VER"
  711.    ENDCASE
  712.    CASE "D"                    ;If the user enters "D" . . .
  713.       GOTO PCPOFF              ;Then PCPOFF will take care of disconnection
  714.    ENDCASE
  715.    CASE "E"                    ;If the user enters "E" . . .
  716.       CLEAR                    ;Clear the screen . . .
  717.       GOTO VERSAOFF            ;And exit
  718.    ENDCASE
  719.    CASE "G"                    ;User wants to go back to city selection
  720.       FIND S0 "3"              ;Check if the level is 3 (remote city)
  721.       IF FOUND                 ;If it is . . .
  722.          GOSUB DISC3           ;Then disconnect from remote city
  723.       ENDIF
  724.       GOTO CITYCHOICE          ;Get new area code
  725.    ENDCASE
  726.    CASE "M"                    ;If user enters "M" . . .
  727.       GOTO BBSMENU             ;Draw the BBSMENU (will return to LABEL4)
  728.    ENDCASE
  729.    DEFAULT                     ;Any other input should be a phone number
  730.       ASSIGN S2 S9             ;So assign it to S2
  731.    ENDCASE
  732. ENDSWITCH                      ;All possibilities covered
  733.  
  734.  
  735.  
  736. ;========== GOLEVEL ==========
  737. ;After the area code and phone number have been safely stored away, it's time
  738. ;to get on with the dialing.  GOLEVEL directs execution to the correct area,
  739. ;based on the value of S0.  (TITLE or another routine will have previously
  740. ;stored the level information in S0.)
  741.  
  742. GOLEVEL:
  743. SWITCH S0          ;Decision based on S0 (level information)
  744.    CASE "1"        ;If S0 = "1" (Modem offline) . . .
  745.       GOTO LEVEL1  ;Start dialing at LEVEL1
  746.    ENDCASE
  747.    CASE "2"        ;If S0 = "2" (Local Telenet) . . .
  748.       CLEAR        ;Clear the screen (LEVEL2 does not do this)
  749.       GOTO LEVEL2  ;Start dialing at LEVEL2
  750.    ENDCASE
  751.    CASE "3"        ;If S0 = "3" (Remote city) . . .
  752.       CLEAR        ;Clear the screen (LEVEL3 does not do this)
  753.       GOTO LEVEL3  ;Start dialing at LEVEL3
  754.    ENDCASE
  755. ENDSWITCH          ;All possibilities covered
  756.  
  757.  
  758.  
  759. ;========== LEVEL1 ==========
  760. ;This level of dialing is performed if the modem is offline when VERSA is
  761. ;started.  The dialing command resets the escape character of your modem
  762. ;to "*" so that it is different than the escape character of the remote
  763. ;PCP modems.  This section assumes that your modem will send the word
  764. ;"CONNECT" to your computer once it is online to Telenet.  If your modem
  765. ;does not do this, you will have to alter this section.  LEVEL1 "falls
  766. ;through" to LEVEL2 when it is finished.
  767.  
  768. LEVEL1:
  769. CLEAR                    ;Clear the screen
  770. TRANSMIT "AT S2=42 DT "  ;Command to dial local modem, reset escape char
  771. MACRO 7                  ;Local Telenet phone number
  772. WAITFOR "CONNECT" 20     ;Wait 20 seconds for modem to send "CONNECT"
  773. IF NOT WAITFOR           ;If modem does NOT connect . . .
  774.    HANGUP                ;Hang up the phone
  775.    CLEAR                 ;Clear the screen
  776.    LOCATE 11,19          ;Locate the cursor for message
  777.    MESSAGE "Local Telenet did not connect.  Redialing."
  778.    LOCATE 0,0            ;Locate cursor out of the way
  779.    PAUSE 1               ;Allow user to see message
  780.    GOTO LEVEL1           ;Loop to beginning to dial again
  781. ENDIF                    ;When Local Telenet is connected with . . .
  782. PAUSE 2                  ;Wait for connection to be properly made
  783. TRANSMIT "^M^M"          ;Send two <CR>s to wake up Telenet
  784. WAITFOR "="              ;Wait for "TERMINAL TYPE =" prompt
  785. TRANSMIT "D1!"           ;Terminal type D1 is for PCs
  786. WAITFOR "@"              ;Wait for Telenet prompt
  787.  
  788.  
  789.  
  790. ;========== LEVEL2 ==========
  791. ;This level of dialing is performed once connection to local Telenet has
  792. ;been made.  This routine checks to make sure that Telenet is still connected
  793. ;before proceeding.  Note that LEVEL2 will go to PORTSET if it connects, or
  794. ;to CITYREDIAL if the city is busy and the user elects to redial.
  795.  
  796. LEVEL2:
  797. IF NOT CONNECTED       ;If Telenet has dropped carrier . . .
  798.    CLEAR               ;Clear the screen
  799.    LOCATE 11,7         ;Locate the cursor for message
  800.    MESSAGE "Telenet has disconnected.  Dialing will begin at the local level."
  801.    LOCATE 0,0          ;Locate the cursor out of the way
  802.    PAUSE 1             ;Allow user to see the message
  803.    ASSIGN S0 "1"       ;Level is now 1
  804.    GOTO GOLEVEL        ;Start dialing over again
  805. ENDIF
  806. ASSIGN S0 "2"          ;Otherwise, level is now 2
  807. FIND S1 "NET"          ;Check to see if user is calling the Net Exchange
  808. IF FOUND               ;If so . . .
  809.    GOTO NETDIAL        ;Go to NETDIAL
  810. ENDIF
  811. TRANSMIT "C DIAL"      ;Otherwise: beginning of city dial command
  812. TRANSMIT S1            ;Area code to be dialed
  813. MACRO 8                ;PCP baud rate
  814. MACRO 9                ;User ID
  815. WAITFOR "="            ;Wait for "PASSWORD ="
  816. MACRO 0                ;User password
  817. RGET S8                ;Get first <CR>
  818. RGET S8                ;Get second <CR>
  819. RGET S8                ;Get message
  820. FIND S8 "CONNECTED"    ;Look for "CONNECTED" in S8
  821. IF FOUND               ;If "CONNECTED" is in S8 . . .
  822.    MESSAGE "^G"        ;Sound the bell, because . . .
  823.    GOTO PORTSET        ;City has been connected -- go to PORTSET
  824. ENDIF
  825. CLEAR                  ;Otherwise, clear the screen . . .
  826. LOCATE 11,11           ;Locate cursor for message
  827. MESSAGE "No modems available in remote city.  Begin redial <Y/N>?"
  828. LABEL5:                ;Loop to here in case of erroneous input
  829. LOCATE 11,68           ;Locate cursor for user input
  830. GET S9 1               ;Get user input (1 character)
  831. SWITCH S9              ;Decision based on user input
  832.    CASE "Y"            ;If user enters "Y" . . .
  833.       GOTO CITYREDIAL  ;Redial the city
  834.    ENDCASE
  835.    CASE "N"            ;If user enters "N" . . .
  836.       GOTO CITYCHOICE  ;Another city must be selected
  837.    ENDCASE
  838.    CASE "D"            ;If user enters "D" . . .
  839.       GOTO PCPOFF      ;PCPOFF will take care of the disconnection
  840.    ENDCASE
  841.    CASE "E"            ;If user enters "E" . . .
  842.       CLEAR            ;Clear the screen . . .
  843.       GOTO VERSAOFF    ;Exit VERSA
  844.    ENDCASE
  845.    DEFAULT             ;If user enters anything else . . .
  846.       MESSAGE "^G"     ;Beep at him or her
  847.       LOCATE 11,68     ;Locate the cursor
  848.       MESSAGE " "      ;Erase the erroneous input
  849.       GOTO LABEL5      ;Redo the GET
  850.    ENDCASE
  851. ENDSWITCH              ;All possibilities covered
  852.  
  853.  
  854.  
  855. ;========== PORTSET ==========
  856. ;PORTSET is done the first time a city is connected with, to set up some
  857. ;special port parameters.  The 1:0 part disables the <CR>@<CR> escape to
  858. ;Telenet, the 4:2 changes the "packet delay" to .1 second, and the 7:8 part
  859. ;enables a break signal for returning to Telenet.  If there are other SET
  860. ;commands that you know of and would like to use, you can place them in the
  861. ;TRANSMIT string along with the others.  Once PORTSET is finished, it will
  862. ;"fall through" to LEVEL3.
  863.  
  864. PORTSET:
  865. TRANSMIT "!@!"                ;Get back to Telenet prompt
  866. WAITFOR "@"                   ;When it appears,
  867. TRANSMIT "SET? 1:0,4:2,7:8!"  ;Do the SETs
  868. WAITFOR "@" 3                 ;Wait for the prompt again
  869. TRANSMIT "CONT!"              ;Get back to Hayes mode
  870.  
  871.  
  872.  
  873. ;========== LEVEL3 ==========
  874. ;This dialing is done once a remote city has been connected with (usually
  875. ;after the SETs have been done).  Like LEVEL2, this routine checks to make
  876. ;sure that Telenet is still connected before proceeding.
  877.  
  878. LEVEL3:
  879. IF NOT CONNECTED          ;If Telenet has dropped carrier . . .
  880.    CLEAR                  ;Clear the screen
  881.    SWITCH S1              ;Decision based on S1 (area code)
  882.       CASE "_NULL"        ;If the area code is unknown . . .
  883.          LOCATE 11,16     ;Locate cursor for message
  884.          MESSAGE "Telenet has disconnected.  Area code is unknown."
  885.          LOCATE 0,0       ;Locate cursor out of the way
  886.          PAUSE 1          ;Allow user to see message
  887.          ASSIGN S0 "1"    ;Level is now 1
  888.          GOTO CITYCHOICE  ;Start over from area code selection
  889.       ENDCASE
  890.       DEFAULT             ;If the area code is known . . .
  891.          LOCATE 11,7      ;Locate cursor for message
  892.          MESSAGE "Telenet has disconnected.  Dialing will begin at the local level."
  893.          LOCATE 0,0       ;Locate cursor out of the way
  894.          PAUSE 1          ;Allow user to see message
  895.          ASSIGN S0 "1"    ;Level is now 1
  896.          GOTO LEVEL1      ;Start dialing
  897.       ENDCASE
  898.    ENDSWITCH              ;All possibilities covered
  899. ENDIF                     ;End of IF NOT CONNECTED routine
  900. ASSIGN S0 "3"             ;Otherwise, level is now 3
  901. TRANSMIT "ATZ!"           ;Reset remote modem
  902. RGET S8 80 3              ;Get first <CR>
  903. RGET S8 80 3              ;Get second <CR>
  904. RGET S8 80 3              ;Get actual message
  905. FIND S8 "OK"              ;Look for "OK" in S8
  906. IF NOT FOUND              ;If no "OK" is found, assume R/V mode . . .
  907.    PAUSE 1                ;Necessary in case of "INVALID COMMAND" response
  908.    TRANSMIT "!"           ;Transmit <CR>
  909.    PAUSE 1                ;Wait
  910.    TRANSMIT "!"           ;Transmit another <CR>
  911.    WAITFOR "*" 5          ;Wait for R/V prompt
  912.    TRANSMIT "I!"          ;Transmit command to exit R/V mode
  913.    WAITFOR "IDLE" 5       ;Wait for confirmation
  914.    TRANSMIT "ATZ!"        ;Reset in Hayes mode
  915.    WAITFOR "OK"           ;Wait for "OK"
  916. ENDIF                     ;End of R/V routine
  917. TRANSMIT "ATDT "          ;Beginning of Hayes dialing command
  918. TRANSMIT S2               ;Telephone number to dial
  919. TRANSMIT "!"              ;<CR> to complete command
  920. RGET S8                   ;Get first <CR>
  921. RGET S8 80 50             ;Wait a maximum of 50 seconds for second <CR>
  922. RGET S8                   ;Get real message
  923. FIND S8 "CONNECT"         ;Find "CONNECT" in S8
  924. IF FOUND                  ;If "CONNECT" is found in S8 . . .
  925.    GOTO BBSCONNECT        ;BBS has been connected, go to BBSCONNECT
  926. ENDIF
  927. CLEAR                     ;Otherwise, clear the screen . . .
  928. LOCATE 11,20              ;Locate the cursor for message
  929. MESSAGE "The BBS is busy.  Begin redial <Y/N>?"
  930. LABEL6:                   ;Loop to here in case of erroneous input
  931. LOCATE 11,58              ;Locate the cursor for user input
  932. GET S9 1                  ;Get user input (1 character)
  933. SWITCH S9                 ;Decision based on user input
  934.    CASE "Y"               ;If the user enters "Y" . . .
  935.       GOTO BBSREDIAL      ;Redial the BBS
  936.    ENDCASE
  937.    CASE "N"               ;If user enters "N" . . .
  938.       GOTO MENUCHECK      ;User must select another BBS to dial
  939.    ENDCASE
  940.    CASE "D"               ;If user enters "D" . . .
  941.       GOTO PCPOFF         ;PCPOFF will take care of the disconnection
  942.    ENDCASE
  943.    CASE "E"               ;If user enters "E" . . .
  944.       CLEAR               ;Clear the screen . . .
  945.       GOTO VERSAOFF       ;Exit VERSA
  946.    ENDCASE
  947.    DEFAULT                ;If the user enters anything else . . .
  948.       MESSAGE "^G"        ;Beep at him or her
  949.       LOCATE 11,58        ;Locate the cursor
  950.       MESSAGE " "         ;Erase the erroneous input
  951.       GOTO LABEL6         ;Redo the GET
  952.    ENDCASE
  953. ENDSWITCH                 ;All possibilities covered
  954.  
  955.  
  956.  
  957. ;========== CITYMENU ==========
  958. ;This CITYMENU is drawn if the user selects option "M" when asked for an area
  959. ;code to dial, or if the S6 variable is set to "ON" (extended menus).  The
  960. ;only reason to not display the menu is because it takes a while to draw,
  961. ;which slows down the program.  In addition to drawing the menu, this section
  962. ;relocates the cursor to the correct position in the menu, then gets the
  963. ;user's input.  It then returns to LABEL3 in CITYCHOICE.
  964.  
  965. CITYMENU:
  966. CLEAR         ;Clear screen for menu drawing
  967. MESS"       ╒════════════════════╡ PC Pursuit City Menu ╞════════════════════╕"
  968. MESS"       │                                                                │"
  969. MESS"       │  E < 1> Atlanta         (404)     C <14> Dallas         (214)  │"
  970. MESS"       │  E < 2> Boston          (617)     C <15> Houston        (713)  │"
  971. MESS"       │  E < 3> Cleveland       (216)     C <16> Milwaukee      (414)  │"
  972. MESS"       │  E < 4> Detroit         (313)     M <17> Minneapolis    (612)  │"
  973. MESS"       │  E < 5> Miami           (305)     M <18> Denver         (303)  │"
  974. MESS"       │  E < 6> Net Exchange    (n/a)     M <19> Phoenix        (602)  │"
  975. MESS"       │  E < 7> Newark          (201)     P <20> Salt Lake City (801)  │"
  976. MESS"       │  E < 8> New York        (212)     P <21> Glendale       (818)  │"
  977. MESS"       │  E < 9> Philadelphia    (215)     P <22> Los Angeles    (213)  │"
  978. MESS"       │  E <10> Res. Tri. Park  (919)     P <23> Portland       (503)  │"
  979. MESS"       │  E <11> Tampa           (813)     P <24> San Francisco  (415)  │"
  980. MESS"       │  E <12> Washington D.C. (202)     P <25> San Jose       (408)  │"
  981. MESS"       │  C <13> Chicago         (312)     P <26> Seattle        (206)  │"
  982. MESS"       │                                                                │"
  983. MESS"       │              E - Eastern Time    C - Central Time              │"
  984. MESS"       │              M - Mountain Time   P - Pacific Time              │"
  985. MESS"       │                                                                │"
  986. MESS"       ├────────────────────────────────────────────────────────────────┤"
  987. MESS"       │         Enter area code or number of desired city:             │"
  988. MESS"       ╘════════════════════════════════════════════════════════════════╛
  989. LOCATE 20,60  ;Locate cursor for user input
  990. GET S9 3      ;Get user input (3 characters)
  991. GOTO LABEL3   ;Return to CITYCHOICE
  992.  
  993.  
  994.  
  995. ;========== BBSMENU ==========
  996. ;This menu is identical in function to CITYMENU, only it is used for your
  997. ;most frequently dialed BBS's.  And, like CITYMENU, this menu is not
  998. ;displayed unless the user requests it by entering "M" or leaving S6 set to
  999. ;"ON", because it takes a while to draw, which slows down execution.  Once
  1000. ;the menu is drawn, the selected area code is printed in the menu to help
  1001. ;the user keep from selecting a BBS that is not in the selected city.  (If
  1002. ;VERSA is started at the remote level, VERSA will not know the selected
  1003. ;area code, and "???" will be printed instead.)  Finally, the cursor is
  1004. ;located inside the menu, the user's input is accepted, and control is
  1005. ;returned to LABEL4 in BBSCHOICE.
  1006.  
  1007. BBSMENU:
  1008. CLEAR                ;Clear the screen for menu drawing
  1009. LOCATE 2,0           ;Locate the cursor for menu drawing
  1010. MESS"     ╒═══════════════════╡ All Cities  BBS Directory ╞═══════════════════╕"
  1011. MESS"     │                                                                   │"
  1012. MESS"     │  < 1> Atlanta PC UG       (404)   <11> The Net Exchange    (703)  │"
  1013. MESS"     │  < 2> Boston Comp. Soc.   (617)   <12> PC Magazine IRS     (212)  │"
  1014. MESS"     │  < 3> Vernon Buerg's BBS  (415)   <13> PC Ohio             (216)  │"
  1015. MESS"     │  < 4> Charisma            (415)   <14> PC Tech Journal BBS (202)  │"
  1016. MESS"     │  < 5> Exec PC             (414)   <15> Phoenix Techline    (612)  │"
  1017. MESS"     │  < 6> Friends!!            (212)   <16> Plantz's Superboard (312)  │"
  1018. MESS"     │  < 7> Friends, Too!!       (212)   <17> Sparta              (201)  │"
  1019. MESS"     │  < 8> Gannett Help Screen (202)   <18>                     (   )  │"
  1020. MESS"     │  < 9> Interconnect        (202)   <19>                     (   )  │"
  1021. MESS"     │  <10> Invention Factory   (212)   <20>                     (   )  │"
  1022. MESS"     │                                                                   │"
  1023. MESS"     │                      Selected area code:                          │"
  1024. MESS"     │                    <G>o back to city selection                    │"
  1025. MESS"     │                                                                   │"
  1026. MESS"     ├───────────────────────────────────────────────────────────────────┤"
  1027. MESS"     │      Enter selection 1-20 or other BBS phone number:              │"
  1028. MESS"     ╘═══════════════════════════════════════════════════════════════════╛"
  1029. LOCATE 15,48         ;Locate cursor for area code printing
  1030. SWITCH S1            ;Decision based on S1 (area code variable)
  1031.    CASE "_NULL"      ;If S1 is empty . . .   │This occurs when VERSA is
  1032.       MESSAGE "???"  ;Unknown area code      │started at the remote level
  1033.    ENDCASE
  1034.    DEFAULT           ;Otherwise . . .
  1035.       MESSAGE S1     ;Print the selected area code
  1036.    ENDCASE
  1037. ENDSWITCH            ;All possibilities covered
  1038. LOCATE 19,60         ;Locate cursor for user input
  1039. GET S9 7             ;Get user input (7 characters)
  1040. GOTO LABEL4          ;Return to BBSCHOICE
  1041.